package model;

import model.pieces.Box;
import model.pieces.Man;
import model.pieces.Piece;
import model.pieces.Target;
import model.pieces.Wall;
import resources.PieceSymbols;

public final class PieceFactory {

	/**
	 * @param pieceType
	 * @param row
	 * @param col
	 * @return
	 */
	public static Piece createPiece(Character pieceType, int row, int col) {
		switch (pieceType) {
		case PieceSymbols.pared:
			return new Wall(col, row);
		case PieceSymbols.caja:
		case PieceSymbols.cajaEnDestino:
			return new Box(col, row);
		case PieceSymbols.destino:
			return new Target(col, row);
		case PieceSymbols.hombre:
		case PieceSymbols.hombreEnDestino:
			return new Man(col, row);
		default:
			return null;
		}
	}

}
